﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BDGetQuote.Web.Models;
using BDGetQuote.Utilities;

namespace BDGetQuote.Web.Controllers
{
    public class ProductController : BaseController
    {
        private IManufacturerRepository _manufacturerRepository;
        private ICategoryRepository _categoryRepository;
        public ProductController()
        {
            _manufacturerRepository = new ManufacturerRepository();
            _categoryRepository = new CategoryRepository();
        }
        public ActionResult Index(int categoryId, int manufacturerId)
        {
            var _user = (UserInfo)Session[Constants.SessionUser];
            ViewBag.Categories = _categoryRepository.GetAll();
            ViewBag.Manufacturers = _manufacturerRepository.GetAll(_user.UserId);
            ViewBag.CategoryId = categoryId;
            ViewBag.ManufacturerId = manufacturerId;

            return View();
        }

    }
}
